#ifndef _CHECKSUM_H_
#define _CHECKSUM_H_

#include "headers.h"

u_short checksum_adjust( u_short chksum, u_short oldp, u_short newp );
u_long checksum_unfold( u_short *buffer, int size );
void checksum_tcp4( ip_header *pIPHeader, tcp_header *pTcpHeader );
void checksum_udp4( ip_header *pIPHeader, udp_header *pUdpHeader );
void checksum_icmp4( ip_header *pIPHeader, icmp_header *pIcmpHeader );
void checksum_tcp6( ip6_header *pIP6Header, tcp_header *pTcpHeader );
void checksum_udp6( ip6_header *pIP6Header, udp_header *pUdpHeader );
void checksum_icmp6( ip6_header *pIP6Header, icmp6_header *pIcmp6Header );

#endif // _CHECKSUM_H_